package edu.sctu.wangxiaoqiang.day20150626;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import edu.sctu.wangxiaoqiang.day20150625.Json;

/**
 * Created by user25 on 2015/6/26.
 */
public class FromJsonDate {
//    public void sd(){
//    Json json1 = {"message":"success","result":[{"surveyid":"1","surveyname":"B"}{"surveyid":"2","surveyname":"C"}]};
//    JSONObject json = JSONObject.parseObject(String.valueOf(json1));
//        JSONArray results = json.getJSONArray("result");
//        for (int i = 0; i < results.size(); i++) {
//            JsonDate jsonDate = new JsonDate();
//            JSONObject result = results.getJSONObject(i);
//            System.out.println(result.getString("surveyId") + " " + result.getString("surveyName"));
//            jsonDate.setSurveyId(result.getString("surveyId"));
//            jsonDate.setSurveyName(result.getString("surveyName"));
//        }
//    }
}
